]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
css: Add a special chroma key color and use it on .workspace-background
authorDaniel van Vugt <daniel.van.vugt@canonical.com>
Thu, 15 Jul 2021 06:18:48 +0000 (14:18 +0800)
committerMarge Bot <marge-bot@gnome.org>
Tue, 9 Aug 2022 07:11:44 +0000 (07:11 +0000)
There's no visible change here since we're just moving from the
default transparent black to transparent other. But the latter can
be used as a special value to indicate to the rendering code when a
background is expected to be always occluded.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1915>

data/theme/gnome-shell-sass/_common.scss
data/theme/gnome-shell-sass/widgets/_window-picker.scss

index 6372af49e313c4087a1a3e9d5a019e1ca4e87b65..f2fe78a3c6d2404df48e9003c14c2e1c3f54c99f 100644 (file)
@@ -35,6 +35,11 @@ $base_border_radius: 8px;
 // radii of things that display over other things, e.g. popovers
 $modal_radius: $base_border_radius*2; // 24px
 
+// Chroma key to flag when a background-color is always occluded, not visible.
+// This allows any box-shadow behind it to be rendered more efficiently by
+// omitting the middle rectangle.
+$invisible_occluded_bg_color: rgba(3,2,1,0);
+
 // fonts
 $base_font_size: 11;
 $text_shadow_color: if($variant == 'light', rgba(255,255,255,0.3), rgba(0,0,0,0.2));
index c71adad54f5121595bbc0de5774f8fa3ebaa0a4a..9067a6d4e64107d73d7e7b5189bb273b129b6c7b 100644 (file)
@@ -48,5 +48,6 @@ $window_close_button_padding: 3px;
 .workspace-background {
   // keep in sync with BACKGROUND_CORNER_RADIUS_PIXELS in workspace.js
   border-radius: 30px;
+  background-color: $invisible_occluded_bg_color;
   box-shadow: 0 4px 16px 4px transparentize(darken($osd_bg_color, 30%), 0.7);
 }